const { createProxyMiddleware } = require('http-proxy-middleware')

module.exports = function (app) {
    app.use(createProxyMiddleware('/api', {
        target: 'http://47.94.172.154:5000',
        pathRewrite: {
            '^/api': '',
        },
        changeOrigin: true,
        secure: false
    }));
    app.use(createProxyMiddleware('/client', {
        target: 'http://47.94.172.154:5000',
        pathRewrite: {
            '^/client': '',
        },
        changeOrigin: true,
        secure: false
    }));
}
